#include <stdio.h>
#include "math_base.h"
#include "KuniMLP.h"
int main()
{
	Perceptron::SetActiveMode(0);
	Perceptron::SetActiveRate(2);
	double X[10][2]={0,0, 0.3,0.2, 0.7,0.1, 1,1, 0.3,0.9, 0.1,0.2, 0,1, 0.9,0.9, 0.9,0.1, 0.7,0.4};//00 00 10 11 01 00 01 11 10 10
//	int T[10][2]={1,0, 1,0, 1,0, 0,1, 1,0, 1,0, 1,0, 0,1, 1,0, 1,0};//0 0 0 1 0 0 0 1 0 0
//	int T[10][2]={1,0, 1,0, 0,1, 0,1, 0,1, 1,0, 0,1, 0,1, 0,1, 0,1};//0 0 1 1 1 0 1 1 1 1
	int T[10][2]={1,0, 1,0, 0,1, 1,0, 0,1, 1,0, 0,1, 1,0, 0,1, 0,1};//0 0 1 0 1 0 1 0 1 1
	KuniMLP::MLPTrainingDataContext context;
	context.nMaxTrainingNumber=300000;
	context.nTrainingDataCount=10;
	context.nT_Size=2;
	context.nX_Size=2;
	context.pTs=(int**)T;
	context.pXs=(double**)X;
	context.rEscapeError=0.001;
	context.rTrainingRate=0.01;
	int p_c[3]={10,10,2};
	KuniMLP mlp(context,3,p_c);
	mlp.Learn();
	return 0;
}